home *** CD-ROM | disk | FTP | other *** search
- APPEND (Deferred)
-
- Prepare to print at the end of a file
-
- Form: APPEND pn [,Ttype] [,L#] [,S#]
- [,D#]
-
- Example: APPEND /PROFILE/CHAPTER.3
-
- This example opens /PROFILE/CHAPTER.3,
- and prepares to print at the end of the
- file.
-
- APPEND is like an OPEN, POSITION to the
- end, followed by a WRITE.
-
- To APPEND a random-access text file,
- use [L#] to indicate the record length
-
- The other options are used as usual.
-
- BINARY OPTIONS (not a command)
-
- Used with BRUN, BLOAD, BSAVE
-
- Each command transfers data between
- file and memory, according to options.
-
- pn must indicate a binary file (BIN) if
- [,Ttype] isn't used.
-
- [,A#] is the first memory address. If
- omitted, the last value of [A#] is
- used. If [E#] used, it is the end
- address; if [L#] is used, it is number
- of bytes moved.
-
- [,B#] is the number of the first used
- byte in the file. Default is 0.
-
- The other options are used as usual.
-
- BLOAD (Imm & Def)
-
- Read binary data from a file
-
- Form: BLOAD pn [,A#] [,B#] [,L#|,E#]
- [,Ttype] [,S#] [,D#]
-
- Example: BLOAD /PIX/ICE,A8192,E16383
- BLOAD /PIX/ICE,A8192,L8192
-
- Both examples move a binary picture
- from /PIX/ICE (type BIN) to graphics
- screen 1. A8192 is the start address of
- the graphics screen. In the first case
- E16383 is the end address, in the
- second, L8192 is the length of the move
- in bytes.
-
- See HELP BINARY for the options.
-
-
-
- BRUN (Imm & Def)
-
- Run a binary program from a file
-
- Form: BRUN pn [,A#] [,B#] [,L#|,E#]
- [,S#] [,D#]
-
- Example: BRUN /VIDEO/LITESHOW
-
- This command causes the binary program
- in the file /VIDEO/LITESHOW (type BIN)
- to be moved into memory and run. It is
- placed in memory starting at the
- address from which it was last BSAVEd.
-
- See HELP BINARY for an explanation of
- the options.
-
-
- BSAVE (Imm & Def)
-
- Save binary data in a file
-
- Form: BSAVE pn ,A# ,L#|,E# [,B#]
- [,Ttype] [,S#] [,D#]
-
- Example: BSAVE /PIX/TOOTH,A8192,E16383
- BSAVE /PIX/TOOTH,A8192,L8192
-
- Both save graphics screen 1 to the file
- /PIX/TOOTH (type BIN). A8192 is the
- start address of the graphics page. In
- the top example, E16383 is the end
- address; in the other, L8192 is the
- length of the move in bytes.
-
- A#, L#, E# are optional after BSAVE if
- pn already exists.
-
- See HELP BINARY.
-
- CAT (Imm & Def)
-
- Show a 40-column directory listing
-
- Form: CAT [pn] [,S#] [,D#]
-
- Example: CAT /BUDGET/JAN
- CAT, S6, D2
-
- The first example lists the files in
- the directory /BUDGET/JAN; the second
- lists files in volume directory S6, D2.
-
- If no options are used, the files in
- the prefix directory are listed.
-
- [pn] must indicate a directory; without
- [pn], files in drive [,S#] [,D#] are
- displayed.
-
- CAT shows filename, type, size, and
- modified date.
-
- CATALOG (Imm & Def)
-
- Show an 80-column directory listing
-
- Form: CATALOG [pn] [,S#] [,D#]
-
- Example: CATALOG /BUDGET/JAN
- CATALOG, S6, D2
-
- The first example lists the files in
- the directory /BUDGET/JAN; the second
- lists files in volume directory S6, D2.
-
- This command shows the same items as
- CAT. In addition, it shows the date
- the file was created, the logical
- length of the file, and some subtype
- information.
-
- See HELP CAT.
-
- CHAIN (Imm & Def)
-
- Run a BASIC program, save the variables
-
- Form: CHAIN pn [,@#] [,S#] [,D#]
-
- Example: CHAIN /SECURITY/ALARM.2 ,@500
-
- This example runs the program in
- /SECURITY/ALARM.2 starting at line 500,
- preserving any variables used by an
- earlier part of the program.
-
- pn indicates a file of type BAS.
-
- [,@#] indicates the line of the program
- at which execution is to start.
-
- The other options are used as usual.
-
- CLOSE (Imm & Def)
-
- Prevent further I/O to a file
-
- Form: CLOSE [pn]
-
- Example: CLOSE /THE/DOOR
-
- This example causes the file DOOR on
- the volume THE to be closed.
-
- pn indicates the file to be closed. If
- you omit pn, all open files are closed.
-
- The CLOSE command does a flush, then it
- removes all information about the file
- from memory (but not from the disk).
-
- This command MUST be used on all open
- files.
-
- CREATE (Imm & Def)
-
- Create a new directory or file
-
- Form: CREATE pn [,Ttype] [,S#] [,D#]
-
- Example: CREATE /BIG/WIG
-
- This example creates a directory file
- (type DIR) with the path /BIG/WIG .
-
- pn is the pathname or partial pathname
- of the file to be created.
-
- type is a 3-letter abbreviation that
- determines the created file's type.
- Abbreviations for the file types are
- listed in HELP FILE .
-
- The other options are used as usual.
-
- DASH (-) (Imm & Def)
-
- Run a BASIC, binary, or EXEC program,
- or run another system program
-
- Form: - pn [,S#] [,D#]
-
- Example: - ANY.PROGRAM
-
- This example runs the program in the
- file ANY.PROGRAM stored in the prefix
- directory.
-
- The program in the file indicated by pn
- can be any type of program file. It
- can be a BASIC program (BAS), a binary
- program (BIN), an EXEC program (TXT),
- or a system program (SYS).
-
- The other options are used as usual.
-
- DELETE (Imm & Def)
-
- Remove a file from its directory
-
- Form: DELETE pn [,S#] [,D#]
-
- Example: PREFIX /LETTERS/GRANDMA
- DELETE OLD.FILE
-
- This example removes the file OLD.FILE
- from the directory /LETTERS/GRANDMA.
- A deleted file cannot be recovered.
-
- pn is the pathname or partial pathname
- of the file to be removed. The file
- must be unlocked. If it is a directory
- file, it must be empty.
-
- The other options are used as usual.
-
- EXEC (Imm & Def)
-
- Read commands from a text file
-
- Form: EXEC pn [,F#] [,S#] [,D#]
-
- Example: EXEC /DISK2/MENU
-
- This example causes the sequential text
- file /DISK2/MENU to be used as the
- source of commands for BASIC rather
- than the keyboard.
-
- pn must indicate a text file, type TXT.
-
- [F#] is the number of fields that
- should be read and discarded before
- execution of the file begins.
-
- The other options are used as usual.
-
- FILE TYPES (not a command)
-
- These are the file type abbreviations
- used by the commands
-
- CREATE, BSAVE, BLOAD, OPEN, APPEND
-
- ABBR FILE TYPE
-
- DIR Directory
- TXT Text
- BAS Applesoft Program
- VAR Applesoft Variables
- BIN Binary
- REL Relocatable Code
- * $F# User Defined
- SYS ProDOS System File
- SYS ProDOS System Program
-
-
- * # is an integer from 1 to 8
-
- FLUSH (Imm & Def)
-
- Empty the buffers of an open file
-
- Form: FLUSH [pn]
-
- Example: FLUSH
-
- This example causes all open files to
- be flushed (except EXEC files).
-
- [pn] indicates the file to be flushed.
- It must be open for FLUSH to have any
- effect. If [pn] is omitted, all open
- files are flushed.
-
- After a file is flushed, you can be
- sure that every character printed to
- the file is stored on the disk.
-
-
-
- HELP (a user-added command)
-
- To use, type: HELP XXX (XXX's below)
-
- Explanatory: HELP, SYNTAX, BINARY,
- FILE
-
- Using Files: CAT, CATALOG, PREFIX,
- CREATE, RENAME, DELETE,
- LOCK, UNLOCK
-
- BASIC in Files: - , LOAD, RUN, SAVE
-
- Programming: CHAIN, STORE, RESTORE,
- PR#, IN#
-
- Text in Files: OPEN, CLOSE, WRITE,
- READ, APPEND, POSITION,
- FLUSH, EXEC
-
- Binary Files: BLOAD, BRUN, BSAVE
-
- IN# (Imm & Def)
-
- Get input from a slot or a program
-
- Form: IN# snum|A#
-
- Examples: IN#3
- IN# A$300
-
- The first example causes subsequent
- characters to be taken from the device
- in slot 3; the second causes the
- routine at $300 to be used for input.
-
- Use either snum or A#, not both. snum
- is the slot for subsequent input, A#
- is the address of an input program
- whose first byte is a 6502 CLD
- instruction.
-
- LOAD (Imm & Def)
-
- Get a BASIC program from a file
-
- Form: LOAD pn [,S#] [,D#]
-
- Example: LOAD /PROGRAMS/QUESTIONS
-
- This example brings the BASIC program
- /PROGRAMS/QUESTIONS into memory.
- Loading a program is just like typing
- NEW and then typing in the program.
-
- The file indicated by pn must contain a
- BASIC program (type BAS).
-
- The other options are used as usual.
-
- LOCK (Imm & Def)
-
- Protect a file from being renamed,
- written to or destroyed.
-
- Form: LOCK pn [,S#] [,D#]
-
- Example: LOCK /NESS/MONSTER ,S6 ,D2
-
- This example locks the file MONSTER on
- the disk named /NESS which should be in
- slot 6, drive 2 (but needn't be).
-
- pn is a pathname or partial pathname.
- You cannot LOCK a volume directory file
- (write protect the disk instead).
-
- The other options are used as usual.
-
-
-
-
-
- - (DASH) (Imm & Def)
-
- Run a BASIC, binary, or EXEC program,
- or run another system program
-
- Form: - pn [,S#] [,D#]
-
- Example: - ANY.PROGRAM
-
- This example runs the program in the
- file ANY.PROGRAM stored in the prefix
- directory.
-
- The program in the file indicated by pn
- can be any type of program file. It
- can be a BASIC program (BAS), a binary
- program (BIN), an EXEC program (TXT),
- or a system program (SYS).
-
- The other options are used as usual.
-
- OPEN (Deferred)
-
- Open a file for reading or writing
-
- Form: OPEN pn [,Ttype] [,L#] [,S#]
- [,D#]
-
- Examples: OPEN /LETTERS/ACCEPTANCE
- OPEN /LIBRARY/BOOK,L100
-
- The first opens a sequential text file;
- the second opens a random-access text
- file whose records are 100 bytes long.
-
- pn indicates a text file (type TXT)
- unless [,Ttype] is used.
-
- A file's record length is set by [,L#]
- the first time the file is opened.
-
- The other options are used as usual.
-
-
- POSITION (Deferred)
-
- Read and discard a number of fields
-
- Form: POSITION pn ,F#|,R#
-
- Example: POSITION WORDLIST,F15
-
- This example causes 15 fields to be
- read and discarded starting at the
- current file position of WORDLIST in
- the prefix directory.
-
- pn must indicate an open text file.
-
- F# and R# have identical meanings. Each
- causes # fields to be read and
- discarded from pn.
-
-
-
-
-
- PR# (Imm & Def)
-
- Send output to a slot or a program
-
- Form: PR# snum|A#|snum,A#
-
- Examples: PR#1
- PR# A$300
- PR#1,A$C300
-
- The first example causes subsequent
- characters to be sent to the device in
- slot 1; the second causes the routine
- at $300 to be used for output; the
- third assigns slot 1 to slot 3.
-
- snum indicates the output slot; A# is
- the address of an output program whose
- first byte is a 6502 CLD instruction.
-
- If both snum and A# are used, snum is
- assigned a new I/O routine.
- PREFIX (Imm & Def)
-
- Assign or view current Prefix
- Pathname = PREFIX + Partial Pathname
-
- Form: PREFIX [pn] [,S#] [,D#]
-
- Examples: PREFIX (Gets Prefix)
- PREFIX /EXAMPLES/PRACTICE
-
- From Immediate mode, No options:
- Prefix displayed on screen.
- From program, no options:
- Next INPUT assigns Prefix to variable
-
- pn must indicate a directory file.
-
- If pn is "/", Prefix is empty, else
- Prefix is set to pn.
-
- [,S#] [,D#] without pn: Prefix set to
- the volume name of [,S#] [,D#]
- READ (Deferred)
-
- Prepare an open file to be read
-
- Form: READ pn [,R#] [,F#] [,B#]
-
- Examples: READ MIND
- READ /OUT/LOUD,R25
-
- The top example prepares MIND from the
- the prefix directory for reading. The
- other prepares record 25 of /OUT/LOUD
- to be read.
-
- After READ, INPUT and GET get data from
- pn until the next ProDOS command is
- issued.
-
- With random-access files, [R#] is the
- record to be read. [F#] and [B#] are
- the number of fields and bytes to skip
- before starting to read.
-
- RENAME (Imm & Def)
-
- Change a file's name
-
- Form: RENAME pn1,pn2 [,S#] [,D#]
-
- Example: PREFIX /MYDISK
- RENAME OLD.NAME,NEW.NAME
-
- This example gives /MYDISK/OLD.NAME
- the new name /MYDISK/NEW.NAME
-
- pn1 is the file's old pathname; it must
- exist, and it must be unlocked.
-
- pn2 is the file's new pathname; it
- must not exist.
-
- pn1 and pn2 must be in same directory.
-
- The other options are used as usual.
-
- RESTORE (Imm & Def)
-
- Get variables from a file
-
- Form: RESTORE pn [,S#] [,D#]
-
- Example: RESTORE /GAMES/HIPPO.VARS
-
- This example reads the variables from
- the file /GAMES/HIPPO.VARS and uses
- them for the program currently in
- memory.
-
- When you restore variables, ProDOS
- first removes all BASIC variables that
- were previously in memory.
-
- pn must indicate a file of type VAR.
-
- The other options are used as usual.
-
- RUN (Imm & Def)
-
- Run a BASIC program from a file
-
- Form: RUN pn [,@#] [,S#] [,D#]
-
- Example: RUN BINGO ,@100
-
- This example loads the file BINGO from
- the prefix directory, and then runs it
- beginning at line 100.
-
- pn must indicate a file of type BAS.
-
- Without the [,@#] option, ProDOS starts
- running the program at its first line.
- With this option, ProDOS starts running
- the program at line #.
-
- The other options are used as usual.
-
- SAVE (Imm & Def)
-
- Save a BASIC program to a file
-
- Form: SAVE pn [,S#] [,D#]
-
- Example: SAVE /CUSHION/WHOOPEE
-
- This example stores the BASIC program
- in memory into the BASIC program file
- (type BAS) /CUSHION/WHOOPEE on a disk.
-
- pn is the pathname or partial pathname
- of the file in which the program is
- to be saved. If pn already exists, it
- must be unlocked, and it must be type
- BAS.
-
- The other options are used as usual.
-
-
-
- STORE (Imm & Def)
-
- Save all variables into a file
-
- Form: STORE pn [,S#] [,D#]
-
- Example: STORE /GAMES/HIPPO.VARS
-
- This example places the names and
- values of all the BASIC variables that
- are currently defined into the file
- /GAMES/HIPPO.VARS, of type VAR.
-
- The values of these variables can be
- brought into memory using the RESTORE
- command.
-
- The other options are used as usual.
-
- SYNTAX of ProDOS command options
-
-
- [,A#] Address of 1st byte to transfer
- [,B#] Bytes to skip
- [,D#] Drive number (1-2)
- [,E#] End address for transfer
- [,F#] Fields to skip
- [,L#] Length of record
- [,R#] Record number in file
- [,S#] Slot of disk drive (1-7)
- [,@#] BASIC line number
-
- pn = Pathname, partial pathname
- snum = Slot number (0-7)
-
- [,Ttype] type = File type abbrev.
-
- See: HELP FILE for file types;
- HELP BINARY for A#, B#, E#, L#
-
- UNLOCK (Imm & Def)
-
- Remove protection from a LOCKed file
-
- Form: UNLOCK pn [,S#] [,D#]
-
- Example: UNLOCK /IMPORTANT/INFO
-
- This example unlocks the file INFO on
- the disk named /IMPORTANT.
-
- When a file is unlocked, it can be
- written to by a program, renamed or
- deleted.
-
- The other options are used as usual.
-
-
-
-
-
-
- WRITE (Deferred)
-
- Prepare an open file to be written
-
- Form: WRITE pn [,R#] [,F#] [,B#]
-
- Examples: WRITE SOON
- WRITE /LY/SO,R26
-
- The top example prepares SOON from the
- prefix directory to be written. The
- other prepares record 26 of /LY/SO to
- be written.
-
- After WRITE, PRINT sends characters to
- pn until a ProDOS command is issued.
-
- With random-access text files, [R#] is
- the record to be written. [F#] and
- [B#] are the number of fields and
- bytes to skip before writing.
-
-